<?php

function txt2Array($file_path){
    return file($file_path,FILE_IGNORE_NEW_LINES);
}

$stem = txt2Array("question/src1.txt");


$ans = txt2Array("answer/ans1.txt");
print_r($ans);

$stem = array_values(array_filter($stem,"trim"));

print_r($stem);